function createInstance(target:MovieClip):MovieClip
{
	removeInstance(target);
	
	var progressLayer=target.attachMovie("progress", "progressLayer", target.getNextHighestDepth());
	progressLayer._x=target._width/2;
	progressLayer._y=target._height/2;

	return progressLayer;
}

function removeInstance(target:MovieClip)
{
	target.progressLayer.unloadMovie();
	target.progressLayer.removeMovieClip();
}